package Strategy;


/**
 * @author liuyang
 * @since 2022/6/24 18:16
 */

public class GetCashFactory {
    public static Strategy createCharge(String[] args) {
        Strategy strategy = null;
        switch (args[0]) {
            case "rebate":
                strategy = new GetCashRebate(args[1]);
                break;
            case "return":
                strategy = new GetCashReturn(args[1], args[2]);
                break;
            default:
                strategy = new GetCash();
        }
        return strategy;
    }
}
